import { createApp } from 'vue';
import { createRouter, createWebHistory } from 'vue-router';

import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';

import App from './App.vue';

const app = createApp(App);

const options = {
    routes: [
        { path: '', redirect: '/student/list' },
        { path: '/student/list', component: () => import('@/components/StudentList.vue') },
        { path: '/student/add', component: () => import('@/components/StudentAdd.vue') }
    ],
    history: createWebHistory()
}

const router = createRouter( options );

app.use(ElementPlus);

app.use( router );

app.mount('#app');
